package com.breakfast.fun.ui.user.info;

import com.breakfast.fun.base.BaseModel;
import com.breakfast.fun.base.BasePresenter;
import com.breakfast.fun.base.BaseView;
import com.breakfast.fun.data.entity.user.User;
import com.breakfast.fun.data.entity.user.UserData;

import java.io.File;
import java.util.Map;

import retrofit2.http.FieldMap;
import rx.Observable;

/**
 * Created by yukai on 16/9/20.
 */
public interface UserInfoContract {
    interface Model extends BaseModel {
        Observable<User> uploadPhotoModel(File file);

        Observable<User> getSaveInfoModel(@FieldMap Map<String, String> map);
    }

    interface View extends BaseView {
        void showSuccess(UserData userData);

        void showInfoSuccess(UserData userData);
    }

    abstract class Presenter extends BasePresenter<Model, View> {
        public abstract void uploadPhoto(File file);

        public abstract void saveInfo(String name, String sex, String birthday);
    }
}
